package com.lzs.chuku.service.other;

import com.lzs.chuku.mapper.other.DictMapper;
import com.lzs.entity.Dict;
import com.lzs.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 小刘先生
 * @date 2020/12/9 20:42
 */
@Service
public class DictserviceImpl implements DictService {
    @Autowired
    private DictMapper dictMapper;
    @Override
    public R findDictByCode(Long id) {
        try{
            List<Dict> list = dictMapper.findDictByCode(id);
            return R.ok().data("list",list);
        }catch (RuntimeException e) {
            return R.error();
        }
    }
}
